﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace WebStudio.Mvc.Core.Helper
{
    public class XmlHelper
    {
        #region 获取XmlDocument
        /// <summary>
        /// 获取XmlDocument
        /// </summary>
        /// <param name="path">xml文件所在的路径</param>
        /// <returns></returns>
        public static XmlDocument GetXmlDocument(string path)
        {
            var xmlDoc = new XmlDocument();
            var settingPath = string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, path);
            xmlDoc.Load(settingPath);
            return xmlDoc;
        }
        #endregion   
    }
}
